package com.xqdok.wdj.thread;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONStringer;

import com.xqdok.wdj.model.Yonghu;
import com.xqdok.wdj.net.HttpConUtils;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.widget.Toast;

public class ZhuCeThread implements Runnable {
	private Context context;
	private HttpConUtils conUtils = new HttpConUtils();
	private Yonghu yonghu;
	private Handler handler;

	public ZhuCeThread(Context context, Yonghu yonghu) {
		this.context = context;
		this.yonghu = yonghu;
	}

	public ZhuCeThread(Context context, Yonghu yonghu, Handler handler) {
		this.context = context;
		this.yonghu = yonghu;
		this.handler = handler;
	}

	public void run() {
		// TODO Auto-generated method stub
		JSONObject object;
		String str = conUtils.zhuce(yonghu);
		Message message = handler.obtainMessage();
		message.obj = str;
		handler.sendMessage(message);
		Log.i("return", "--------------" + str);
	}

}
